﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


namespace MapEditor.GUI
{
    public class BackLayerButton : Button
    {
        //Declare instance variable
        public bool clicked = false;

        //Constructor
        public BackLayerButton(Texture2D texture, Vector2 position) : base(texture, position)
        {

        }

        public override void Update()
        {
            prevClicked = Clicked;
            clicked = base.Clicked;
            base.Update();
        }

        public override void Effect()
        {
            if (Game1.drawableLayer > 0)
            {
                //Set the drawable layer
                Game1.drawableLayer -= 1;
                base.prevClicked = false;
                Game1.drawOffset.X = 0;
                Game1.drawOffset.Y = 0;
                base.Effect();
            }
        }
    }
}
